"""cmdb URL Configuration
 
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from assets import views,assetsimport,account
from django.urls import include
from django.contrib.auth import views as auth_views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('index/', views.dashboard, name='index'),
    path('serverdetail/<asset_id>/', views.serverdetail, name="serverdetail"),
    path('networkdevicedetail/<asset_id>/', views.networkdevicedetail, name="networkdevicedetail"),
    path('', views.dashboard,name='dashboard'),
    path('server/',views.server,name='server'),
    path('serverimport/',assetsimport.serverimport,name='serverimport'),
    path('networkdevice/',views.networkdevice,name='networkdevice'),
    path('networkdeviceimport/',assetsimport.networkdeviceimport,name='networkdeviceimport'),
    path('file_download/<id>/',views.file_download,name='file_download'),
    #path('accounts/',include('django.contrib.auth.urls')),
    path('datacenter/',views.datacenter,name='datacenter'),
    path('ipnet/',views.ipnet,name='ipnet'),
    path('login/',account.account_login,name='login'),
    path('logout/',account.account_logout,name='logout'),
    path('userinfo/',account.userinfo,name='userinfo'),
    path('cabinet/',views.cabinet,name='cabinet'),
    path('cabinetimport/',assetsimport.cabinetimport,name='cabinetimport'),
    path('datacenterimport/',assetsimport.datacenterimport,name='datacenterimport'),
    #path('ipnetimport/',assetsimport.ipnetimport,name='ipnetimport'),
    path('datacenterdetail/<datacenter_id>/', views.datacenterdetail, name="datacenterdetail"),
    path('cabinetdetail/<cabinet_id>/', views.cabinetdetail, name="cabinetdetail"),
    path('ipnetdetail/<ipnet_id>/', views.ipnetdetail, name="ipnetdetail"),
    path('ipaddress/',views.ipaddress,name='ipaddress'),
    path('ipaddressdetail/<ipaddress_id>/', views.ipaddressdetail, name="ipaddressdetail"),
    path('portimport/<asset_id>/',assetsimport.portimport,name='portimport'),
    path('interconnectimport/',assetsimport.interconnectimport,name='interconnectimport'),
    path('ajax_bar/',views.ajax_bar,name='ajax_bar'),
    path('assetimport/<asset_type>/',assetsimport.assetimport,name='assetimport'),
    path('circuit/',views.circuit,name='circuit'),
    path('circuitdetail/<circuit_id>/',views.circuitdetail,name='circuitdetail'),
    path('dwdm/',views.dwdm,name='dwdm'),
    path('dwdmdetail/<dwdm_id>/',views.dwdmdetail,name='dwdmdetail'),
    path('channel/',views.channel,name='channel'),
    path('channeldetail/<channel_id>/',views.channeldetail,name='channeldetail'),
    path('getdata/',views.getdata,name='getdata'),
    path('getdatacenter/',views.getdatacenter,name='getdatacenter'),
    path('conipnet/',views.conipnet,name='conipnet'),
]
